<?php
/**
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       app.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
?>
<!DOCTYPE html>
<html>
<head>
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php echo 'Axia Solutions Systems Portal' ?>
		<?php echo $title_for_layout; ?>
	</title>
	<?php
		echo $this->Html->meta('icon');
		echo $this->Html->css('bootstrap.min');
		echo $this->Html->css('style');
		echo $this->Html->css('bootstrap-datetimepicker');
		
		
		echo $this->Html->script('jquery-1.7.2');
		echo $this->Html->script('bootstrap.min');
		echo $this->Html->script('jquery.dataTables');
		echo $this->Html->script('jquery-ui');
		echo $this->Html->script('bootstrap-datetimepicker');
		
		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('script');
	?>

</head>
<body>
	<div class="container">
		<div id="header">
			<h1><?php echo $this->Html->link($this->Html->image('apbanner.jpg', array('alt' => 'Axia Solutions, The Family Contact Services Specialist', 'border' => '0')),'http://localhost',array('target' => '_blank', 'escape' => false)); ?></h1>
		</div>
		<div class="navbar">
			<div class="navbar-inner">
			<?php //echo $this->Html->image('leftnav.bmp', array('alt' => 'Navigation Element', 'border' => '0')); ?>
			<ul class="nav">
				<li><?php echo $this->Html->link('Home', '/'); ?></li>
				<li><?php echo $this->Html->link('Schedule', '/Schedules'); ?></li>
				<li><?php echo $this->Html->link('Resources', '/resources'); ?></li>
				<li><?php echo $this->Html->link('Office CRM', '/Offices'); ?></li>
				<li><?php echo $this->Html->link('Employee Details', '/Employees'); ?></li>
				<!--<li><?php //echo $this->Html->link('Reports', '/reports'); ?></li>-->
				<li><?php echo $this->Html->link('Logout', array('controller' => 'Users', 'action' => 'logout', 'full_base' => true)); ?></li>
			</ul>
			<?php //echo $this->Html->image('rightnav.bmp', array('alt' => 'Navigation Element', 'border' => '0', 'style' => 'float:right')); ?>
			</div>
		</div>
		<div id="content">
		<?php 
		$uname = CakeSession::read("Auth.User.UserName");

		?>
			You are here: <?php echo $this->Html->getCrumbs(' > ', 'Home'); ?><span style="float:right;"><?php echo "Hello, $uname";?></span>
			<?php echo $this->Session->flash(); ?>

			<?php echo $this->fetch('content'); ?>
			<div class="clear" style="clear:both;"> </div>
		</div>
		<div id="footer">
		<?php
			$paramsQuery = $this->params->query;
			if(!is_array($paramsQuery))
			{
				$paramsQuery = array();
			}
			$paramsQuery['url'] = ( isset($paramsQuery['url']) ) ? $paramsQuery['url'] : '';
			$url = $paramsQuery['url'];
			unset($paramsQuery['url']);
			$params = $paramsQuery;

			$mobile_url = '/' . $url . '?' . http_build_query( array_merge( $params, array( 'forcedLayout' => 'mobile' ) ) );
			$desktop_url = '/' . $url . '?' . http_build_query( array_merge( $params, array( 'forcedLayout' => 'desktop' ) ) );
		?>
			<div id="footCol"><p>Call Us:<br /> 1300 00 AXIA (2942)</p></div>
			<div id="footCol"><p>Other Enquires:<br /> enquires@axiasolutions.com.au</p></div>
			<div id="footColL"><p>Staff Portal Login / <?php if($is_mobile): ?>
        <?php echo $this->Html->link('Desktop Site', $desktop_url, array('target' => '', 'class' => '')) ?>
    <?php else: ?>
        <?php echo $this->Html->link('Mobile Site', $mobile_url, array('target' => '', 'class' => '')) ?>
    <?php endif; ?></p></div>
		</div>
	</div>
	<?php //echo $this->element('sql_dump'); ?>
	<script>
		$('.datetime').datetimepicker({
			format: 'yyyy-m-d',  //format: 'yyyy-MM-dd hh:mm:ss' either one works     
			language: 'en',
			pick12HourFormat: false,
			startView: 4,
			startDate: '-100y',
			endDate: '+1d',
			minView: 2,
			autoclose: 1,
			forceParse: 1,
			todayBtn: 0
		  });
		  
</script>
</body>
</html>
